package com.hutou.chuangke.uitl;

import android.content.SharedPreferences;

/**
 * 项目配置文件
 *
 * @author peter_wang
 * @create-time 16/1/12 09:24
 */
public class Config {
    public static boolean isOpenLog = true;


    public static final String BROADCAST_NAME = "cancai.lotterynurse.broadcast";

    /**
     * 是否打开推送
     *
     * @return 是否打开推送
     */
    public static boolean getPushSetting() {
        SharedPreferences sp = ActionUtil.getSharedPreferences();
        return sp.getBoolean("setting_is_open_push", true);
    }

    /**
     * 设置推送
     */
    public static void setPushSetting(boolean setting) {
        SharedPreferences.Editor editor = ActionUtil.getEditor();
        editor.putBoolean("setting_is_open_push", setting);
        editor.commit();
    }

    /**
     * 是否允许用流量播放
     *
     * @return 是否打开推送
     */
    public static boolean getPlayByMobileTrafficSetting() {
        SharedPreferences sp = ActionUtil.getSharedPreferences();
        return sp.getBoolean("setting_is_play_mobile_traffic", true);
    }

    /**
     * 设置允许用流量播放
     */
    public static void setPlayByMobileTrafficSetting(boolean setting) {
        SharedPreferences.Editor editor = ActionUtil.getEditor();
        editor.putBoolean("setting_is_play_mobile_traffic", setting);
        editor.commit();
    }
}  
